package org.atovio.blog.mapper;

import org.apache.ibatis.annotations.Select;
import org.atovio.blog.model.pojo.Cv;

import java.util.List;

/**
 * @author AtoVio, Winter Yuan
 */
public interface CvMapper {

    /**
     * 通过id查询
     * @param id id
     * @return Cv对象
     */
    @Select("""
            select id, name, sex, age
            from cv
            where id = #{id}
            """)
    Cv selectById(Integer id);

    /**
     * 查所有
     * @return 全部记录
     */
    @Select("select * from cv")
    List<Cv> selectAll();
}
